//
//  LS_ShowMessageView.m
//  breadPro
//
//  Created by 刘文超 on 2019/7/19.
//  Copyright © 2019 刘文超. All rights reserved.
//

#import "LS_ShowMessageView.h"
#import <MMProgressHUD.h>
@implementation LS_ShowMessageView
//MMProgressHUDPresentationStyleDrop = 0, //default
//MMProgressHUDPresentationStyleExpand,
//MMProgressHUDPresentationStyleShrink,
//MMProgressHUDPresentationStyleSwingLeft,
//MMProgressHUDPresentationStyleSwingRight,
//MMProgressHUDPresentationStyleBalloon,
//MMProgressHUDPresentationStyleFade,
//MMProgressHUDPresentationStyleNone
+ (void)showErrorWithMessage:(NSString *)message
{
    [MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleDrop];
    [MMProgressHUD setDisplayStyle:MMProgressHUDDisplayStyleBordered];
    [MMProgressHUD showWithTitle:message status:nil];
    [MMProgressHUD dismissWithError:nil title:message afterDelay:2.0];
    
}
+ (void)showSuccessWithMessage:(NSString *)message
{
    [MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleSwingRight];
    [MMProgressHUD setDisplayStyle:MMProgressHUDDisplayStyleBordered];
     [MMProgressHUD showWithTitle:message status:nil];
    [MMProgressHUD dismissWithSuccess:nil title:message afterDelay:2.0];
}
+ (void)showStatusWithMessage:(NSString *)message
{
    [MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleExpand];
    [MMProgressHUD showWithTitle:nil status:message];
}
+ (void)dismissSuccessView:(NSString *)message
{
    [MMProgressHUD dismissWithSuccess:message];
}
+ (void)dismissErrorView:(NSString *)message
{
    [MMProgressHUD dismissWithError:message];
}

@end
